package com.zrrd.jt_admin.shop.goods.controller;


import com.zrrd.jt_admin.common.response.ResponseResult;
import com.zrrd.jt_admin.shop.goods.service.GoodsService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Zhangyk
 * @since 2024-06-29
 */
@RestController
@RequestMapping("/shop")
public class GoodsController {
    @Resource
    private GoodsService goodsService;

    @GetMapping("/goods")
    @ResponseBody
    public ResponseResult findAll(){
        return ResponseResult.queryResponse(goodsService.list());
    }
}

